package huixue.cn.com.rxapp.user.ui;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;

import huixue.cn.com.rxapp.R;
import huixue.cn.com.rxapp.base.BaseActivity;
import huixue.cn.com.rxapp.user.UserSingle;
import huixue.cn.com.rxapp.user.present.HomePresenter;

@Route(path ="/sys/user/homeActivity")
public class HomeActivity extends BaseActivity<HomePresenter,HomePresenter.HomeUI> implements HomePresenter.HomeUI {

    @Override
    protected HomePresenter createPresenter() {
        return new HomePresenter();
    }

    @Override
    public int getLayout() {
        return R.layout.activity_home;
    }

    @Override
    protected HomePresenter.HomeUI getUI() {
        return this;
    }

    @Override
    public void initView() {
        ((TextView)findViewById(R.id.layout_user_name).findViewById(R.id.title_tv)).setText(UserSingle._getInstance().getUser().getAccount());
        ((TextView)findViewById(R.id.layout_user_phone).findViewById(R.id.title_tv)).setText(UserSingle._getInstance().getUser().getPhone());
        ((TextView)findViewById(R.id.layout_user_nick).findViewById(R.id.title_tv)).setText(UserSingle._getInstance().getUser().getUuid());
    }

    @Override
    public void addEvent() {

    }
}
